package com.fulu.springcloud.feignserver.controller;

import com.fulu.springcloud.feignserver.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    // 编译器报错，无视。 因为这个Bean是在程序启动的时候注入的，编译器感知不到，所以报错。
    @Autowired
    HelloService helloService;

    @RequestMapping("hi")
    public String sayHi(String name){
        return helloService.sayHi(name);
    }
}
